package com.port.eleport.model.biz;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;

/**
 * 订单详情
 * @author jameschen
 *
 */
@Entity
@Table(name = "biz_order_detail", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TOrderDetail extends IdEntity {
	
	/**
	 * 货号
	 */
	@Column(name="product_no")
	private  String productNo;
	/**
	 * 商品名称
	 */
	@Column(name="goods_name")
	private  String  goodsName;
	
	/**
	 * 数量
	 */
	@Column(name="qty_")
	private Integer qty;
	
	/**
	 * 计量单位
	 */
	@Column(name="unit_")
	private String  unit;
	
	/**
	 * 商品单价
	 */
	@Column(name="price_")
	private BigDecimal  price;
	
	/**
	 * 商品总额
	 */
	@Column(name="amount_")
	private BigDecimal  amount;
	
	/**
	 * 订单
	 */
	@ManyToOne
	@JoinColumn(name="order_id")
	private TOrder order;

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public Integer getQty() {
		return qty;
	}

	public void setQty(Integer qty) {
		this.qty = qty;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public TOrder getOrder() {
		return order;
	}

	public void setOrder(TOrder order) {
		this.order = order;
	}
}
